package com.yxw.blog.conf.exception;

import com.yxw.blog.bean.response.ResponseCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yexinwei
 */
@Getter
@AllArgsConstructor
public class BlogException extends RuntimeException{
    private Integer code;
    private String msg;

    public BlogException(ResponseCode responseCode){
        this.code = responseCode.getCode();
        this.msg = responseCode.getMsg();
    }
}
